$def with (download_list)
$clear_stat()
<form action="/action/" method="post" enctype="multipart/form-data">
<table id="controls">
    <tr>
        <td><input type='submit' name='start' value='' class="start"></td>
        <td><input type='submit' name='stop' value='' class="stop"></td>
        <td style="padding-top:7px;">
            URL:&nbsp; <input type="text" name="url" class="url"> &nbsp;or&nbsp;
            <input type='file' name='ufile' class="file" size="15">
        </td>
        <td><input type='submit' name='add' value='' class="addurl"></td>
        <td><input type='submit' name='delete' value='' class="delete"></td>
        <td><a href="/list/" title="refrash"><img src="/static/images/view-refresh.png" alt="refrash"></a></td>
        <td><a href="/settings/" title="settings"><img src="/static/images/preferences-system.png" alt="settings"></a></td>
    </tr>
</table>
<div id="views">
    <ul>
        <li class="active"><a href="/list/">All</a>
        <li><a href="/list/complete">Complite</a>
        <li><a href="/list/incomplete">Incomplite</a>
    </ul>
</div>
<div id="wraper">
<table id="main">
    <tr>
        <th></th>
        <th>Status</th>
        <th>Name</th>
        <th>Down/Size</th>
        <th>Seeders</th>
        <th>Leechers</th>
        <th>Down speed</th>
        <th>Up speed</th>
        <th>Ratio</th>
        <th>Message</th>
        <th>Priority</th>
        <th>Actions</th>
    </tr>
    $for torrent in download_list:
        <tr>
        <td><input type="checkbox" name="t-$torrent.hash" value="$torrent.hash"></td>
        <td class="status">$:status_replace(torrent.status)</td>
        <td><a href="/detail/$torrent.hash">$torrent</a></td>
        <td class="size">$:human_size(torrent.completed_bytes)/$:human_size(torrent.size)
        $:processbar(torrent.completed_bytes, torrent.size)</td>
        <td>$torrent.peers_complete ($torrent.peers_connected)</td>
        <td>$:leechers(torrent.peers_connected, torrent.peers_complete)</td>
        <td>$:human_size(torrent.down_rate)</td>
        <td>$:human_size(torrent.up_rate)</td>
        <td>$:ratio(torrent.ratio)</td>
        <td class="message">$torrent.message</td>
        <td><select name="p-$torrent.hash">
        $:priority_select(torrent.priority)
        </select></td>
        <td class="actions">
            <a href="/start/?hash=$torrent.hash" title="start">
                <img src="/static/images/mini/media-playback-start.png" alt="start">
            </a>
            <a href="/stop/?hash=$torrent.hash" title="stop">
                <img src="/static/images/mini/media-playback-stop.png" alt="stop">
            </a>
            <a href="/delete/?hash=$torrent.hash" title="delete">
                <img src="/static/images/mini/list-remove.png" alt="delete">
            </a></td>
        </tr>
        $:global_stat(torrent.completed_bytes, torrent.size, torrent.down_rate, torrent.up_rate)
    <tr style="background:#ddd;">
    <td></td>
    <td></td>
    <td><strong>Total:</strong></td>
    <td class="size">$:human_size(global_stat(0, 0, 0, 0, 1))/$:human_size(global_stat(0, 0, 0, 0, 0, 1))
    $:processbar(global_stat(0, 0, 0, 0, 1), global_stat(0, 0, 0, 0, 0, 1))</td>
    <td></td>
    <td></td>
    <td>$:human_size(global_stat(0, 0, 0, 0, 0, 0, 1))</td>
    <td>$:human_size(global_stat(0, 0, 0, 0, 0, 0, 0, 1))</td>
    <td></td>
    <td class="message"></td>
    <td class="priority"><input type="submit" name="set_priority" value="Set"></td>
    <td class="actions"></td>
    </tr>
</table>
</form>
</div>
